<?php
class Rol_model extends CI_Model {
	public $id;
	public $nombre;
	public $table = 'rol';
	public function get_rol_by_id($id) {
		$this->db->from ( $this->table );
		$this->db->where ( 'id', $id );
		return $this->db->get ()->row ( 0, 'Rol_model' );
	}
	public function guardar($rol) {
		$this->db->insert ( $this->table, $rol );
		return $this->db->insert_id ();
	}
	public function setName($name) {
		$this->nombre = $name;
	}
	public function get_name() {
		return $this->nombre;
	}
}
?>